<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用例测试 | algorithm.js / xhtmlToJson.js</title>
    <script src="../../dist/algorithm.js"></script>
</head>

<body>

    <div id="test">
        <div>
            <h2 class='title'>标题</h2>
            <p class='item' isFirst=yes>
                段落1
                <a href="">链接</a>
            </p>
            <p>
                段落2
            </p>
            <p>
                段落3
            </p>
            <div>
                <i>[1]</i>
                句子
            </div>
        </div>
    </div>

    <script>

        console.log(algorithm.xhtmlToJson(document.getElementById('test').innerHTML));

    </script>

</body>

</html>
